import request from './request'
const app =  getApp();
// 获取用户信息
export const getUserInfor = (data) => {
  return request({ method: 'POST', url: 'Login/getWechatInfo', data})
}
// 验证授权并创建用户
export const getWechat = (data) => {
  return request({method: 'POST', url: 'Login/getWechatInfoValidation', data})
}
// 微信登录
export const userLogin = (data) => {
  return request({method: 'POST', url: 'Login/wechatLogin', data})
}
// 账号登陆
// export const getLogin = (data) => {
//   return request({method: 'POST', url:'Login/getLogin'},data)
// }
// 临时锁定关系
export const getUpdateLevelByUid = (data) => {
  return request({ method: 'POST', url: 'Login/updateLevelByUid', data})
}
// 搜索
export const shopSearch = (data) => {
  return request({method: 'POST', url: 'Goods/getGoodsSearch', data})
}
// 分类
export const goodClass = (data) => {
  return request({ method: 'GET', url: 'Index/getNav', data })
}
// 商城首页
export const shopAdmin = (data) => {
  return request({method: 'POST', url: 'Index/getIndexData', data})
}
// 商品分页列表
export const shopPageList = (data) => {
  return request({method: 'POST', url: 'Goods/getGoodsListByCategoryId', data})
}
// 商品列表 
export const apiGetIndexGoodsCategoryList = (data) => {
  return request({method: 'POST', url: 'Index/getIndexGoodsCategoryList', data})
}
// 商品详情
export const goodsDetail = (data) => {
  return request({ method: 'GET', url: 'Goods/getGoodsDetails', data })
}
// 商品列表
export const goodsList = (data) => {
  return request({ method: 'GET', url: 'Goods/getGoodsList', data })
}
// 购物车列表
export const cartList = (data) => {
  return request({ method: 'GET', url: 'Cart/cartList', data })
}
// 加入购物车
export const apiAddCart = (data) => {
  return request({ method: 'POST', url: 'Cart/addCart', data })
}
// 删除购物车
export const apiCartDelete = (data) => {
  return request({ method: 'POST', url: 'Cart/cartDelete', data })
}
// 购物车修改数量
export const apiCartAdjustNum = (data) => {
  return request({method: 'POST', url: 'Cart/cartAdjustNum', data})
}
// 轮播图
export const apiGetBannerById = (data) => {
  return request({ method: 'GET', url: 'Index/getBannerById', data })
}

// 用户地址管理
export const getMemberAdd = (data) => {
  return request({method: 'GET', url: 'Member/getMemberAddressList', data})
}
// 添加收货区地址
export const addMemberAdd = (data) => {
  return request({method: 'POST', url: 'Member/addMemberAddress', data})
}
// 保存微信收货地址
export const saveWeixinAdd = (data) => {
  return request({method: 'POST', url: 'Member/saveWeixinAddress', data})
}
// 修改会员地址
export const apiUpdateMemberAdd = (data) => {
  return request({method: 'POST', url: 'Member/updateMemberAddress', data})
}
//  获取收货地址详情
export const apiAddressDetail = (data) => {
  return request({method: 'GET', url: 'Member/getMemberAddressDetail', data})
}
//  删除收货地址
export const apiAddressDelete = (data) => {
  return request({method: 'POST', url: 'Member/memberAddressDelete', data})
}
// 修改用户默认地址
export const addDefault = (data) => {
  return request({method: 'POST', url: 'Member/updateAddressDefault', data})
}

// 获取省市县
export const apiGetPCDDate = (data) => {
  return request({method: 'GET', url: 'Member/getPCDDate', data})
}
// 订单结算
export const apiGetPayOrder = (data) => {
  return request({method: 'POST', url: 'Order/getPayOrder', data})
}
// 创建订单
export const apiOrderCreate = (data) => {
  return request({method: 'POST', url: 'Order/orderCreate', data})
}
// 获取用户订单列表
export const apiGetOrderList = (data) => {
  return request({method: 'POST', url: 'Order/getOrderList', data})
}
// 订单详情
export const apiOrderDetail = (data) => {
  return request({method: 'GET', url: 'Order/orderDetail', data})
}
// 关闭订单
export const apiOrderClose = (data) => {
  return request({method: 'POST', url: 'Order/orderClose', data})
}
// 确认收获
export const apiOrderTakeDelivery = (data) => {
  return request({method: 'POST', url: 'Order/orderTakeDelivery', data})
}
// 去支付
export const apiOrderPay = (data) => {
  return request({method: 'POST', url: 'Order/orderPay', data})
}
// 申请退款
export const apiOrderGoodsRefundAskfor = (data) => {
  return request({method: 'POST', url: 'Order/orderGoodsRefundAskfor', data})
}
// 申请退款售后
export const apiOrderGoodsCustomerServiceAskfor = (data) => {
  return request({method: 'POST', url: 'Order/orderGoodsCustomerServiceAskfor', data})
}
// 买家退货
export const apiOrderGoodsRefundExpress = (data) => {
  return request({method: 'POST', url: 'Order/orderGoodsRefundExpress', data})
}
// 买家退货售后
export const apiOrderGoodsCustomerExpress = (data) => {
  return request({method: 'POST', url: 'Order/orderGoodsCustomerExpress', data})
}
// 订单项退款详情
export const apiRefundDetail = (data) => {
  return request({method: 'POST', url: 'Order/refundDetail', data})
}
// 订单退款详情 售后
export const apiCustomerDetail = (data) => {
  return request({method: 'POST', url: 'Order/customerDetail', data})
}
// 删除订单
export const apiDeleteOrder = (data) => {
  return request({method: 'POST', url: 'Order/deleteOrder', data})
}
// 物流详情
export const apiOrderExpress = (data) => {
  return request({method: 'POST', url: 'Order/orderExpress', data})
}
// 查询包裹物流信息
export const apiGetOrderGoodsExpressMessage = (data) => {
  return request({method: 'POST', url: 'Order/getOrderGoodsExpressMessage', data})
}
// 订单点击查看物流操作
export const apiCheckLogistics = (data) => {
  return request({method: 'POST', url: 'Order/checkLogistics', data})
}
// 支付界面订单支付
export const apiPay = (data) => {
  return request({method: 'POST', url: 'Pay/pay', data})
}
// 确认支付
export const apiOrderBindBalance = (data) => {
  return request({method: 'POST', url: 'Pay/orderBindBalance', data})
}
// 小程序调起支付api
export const apiAppletWechatPay = (data) => {
  return request({method: 'POST', url: 'Pay/appletWechatPay', data})
}
// 会员中心
export const apiMemberIndex = (data) => {
  return request({method: 'GET', url: 'Member/memberIndex', data})
}
// 会员中心
export const apiDistributionCenter = (data) => {
  return request({method: 'GET', url: 'Balance/distributionCenter', data})
}
// 我的佣金/提成
export const apiGetCommissionStatistics = (data) => {
  return request({method: 'GET', url: 'Balance/getCommissionStatistics', data})
}
// 佣金明细列表/提成
export const apiGetBalanceList = (data) => {
  return request({method: 'POST', url: 'Balance/getBalanceList', data})
}
// 实名认证
export const apiUserNameAuthentication = (data) => {
  return request({method: 'POST', url: 'Balance/userNameAuthentication', data})
}
// .......................................................................................................//
// 添加提现账号
export const apiAddAccount = (data) => {
  return request({method: 'POST', url: 'Balance/addAccount', data})
}
// 获取提现账号详情
export const apiGetAccountInfo = (data) => {
  return request({method: 'GET', url: 'Balance/getAccountInfo', data})
}
// 修改提现账号
export const apiUpdateAccount = (data) => {
  return request({method: 'POST', url: 'Balance/updateAccount', data})
}
// 提现账号列表
export const apiAccountList = (data) => {
  return request({method: 'GET', url: 'Balance/accountList', data})
}
// 删除提现账号
export const apiDeleteAccount = (data) => {
  return request({method: 'GET', url: 'Balance/deleteAccount', data})
}
// 设置默认提现账号
export const apiCheckAccount = (data) => {
  return request({method: 'POST', url: 'Balance/checkAccount', data})
}
// 申请提现页面数据
export const apiToWithdrawInfo = (data) => {
  return request({method: 'GET', url: 'Balance/toWithdrawInfo', data})
}
// 申请提现
export const apiToWithdraw = (data) => {
  return request({method: 'POST', url: 'Balance/toWithdraw', data})
}
// 余额提现记录
export const apiGetCommission = (data) => {
  return request({method: 'GET', url: 'Balance/getCommission', data})
}
// 表单提交
export const apiAddNotice = (data) => {
  return request({method: 'POST', url: 'Index/addNotice', data})
}
export const apiGetTeamList = (data) => {
	return request({method: 'GET', url: 'Team/getMyTeamList', data})
}
// 分享赚
export const apiGoodsShare = (data) => {
  return request({method: 'GET', url: 'Goods/goodsShare', data})
}
// 获取多赚图片
export const apiGetArticle = (data) => {
  return request({method: 'GET', url: 'index/getArticle', data})
}
// 生成价格图片
export const apiGetPriceImage = (data) => {
  return request({method: 'GET', url: 'Qrcode/shareImg', data})
}
// 生成二维码
export const apiGetQRCode = (data) => {
  return request({method: 'GET', url: 'Qrcode/getXcxCode', data})
}
// 助力分享列表
export const apiHelpGoodsList = (data) => {
  return request({method: 'GET', url: 'HelpForce/helpGoodsList', data})
}
// 助力分享
export const apiPowerSharing = (data) => {
  return request({method: 'POST', url: 'Helpforce/powerSharing', data})
}
// 进入分享页面
export const apiHelpSharingDetails = (data) => {
  return request({method: 'GET', url: 'Helpforce/helpSharingDetails', data})
}
// 点击助力
export const apiClickHelp = (data) => {
  return request({method: 'GET', url: 'Helpforce/clickHelp', data})
}
// 倒计时
export const apiShareCountdown = (data) => {
  return request({method: 'POST', url: 'Helpforce/shareCountdown', data})
}
// 新人领取红包
export const apiAddReceiveRed = (data) => {
  return request({method: 'GET', url: 'Redpackage/addReceiveRed', data})
}
// 订单结算--助力商品结算页面
export const getPayOrderHelp = (data) => {
  return request({method: 'GET', url: 'Order/getPayOrderHelp', data})
}
// 订单结算--助力商品结算页面
export const helpSharingDetails = (data) => {
  return request({method: 'GET', url: 'Helpforce/helpSharingDetails', data})
}
// 助力商品结算页面
export const apiGetPayOrderHelp = (data) => {
  return request({method: 'POST', url: 'Order/getPayOrderHelp', data})
}
// 我的助力信息
export const apiGetHelpComplete = (data) => {
  return request({method: 'GET', url: 'Helpforce/getHelpComplete', data})
}
// 助力订单列表
export const apiGetHelpUserOrderList = (data) => {
  return request({method: 'GET', url: 'Helpforce/getHelpUserOrderList', data})
}
// 助力红包
export const apiGetHelpCommission = (data) => {
  return request({method: 'GET', url: 'Helpforce/getHelpCommission', data})
}
// 红包相关图片
export const apiRedImages = (data) => {
  return request({method: 'GET', url: 'Redpackage/redImages', data})
}
// 红包分享生成二维码
export const apiRedXcCode = (data) => {
  return request({method: 'GET', url: 'Qrcode/redXcCode', data})
}
// 余额变更明细
export const apiAllBalanceList = (data) => {
  return request({method: 'GET', url: 'Balance/allBalanceList', data})
}
// 消息提示
export const apiGetMessageNotice = (data) => {
  return request({method: 'GET', url: 'Index/getMessageNotice', data})
}
// 获得红包数据统计 
export const apiShareRed = (data) => {
  return request({method: 'GET', url: 'Redpackage/shareRed', data})
}
// 意见反馈
export const apiAddMemberFeedback = (data) => {
  return request({method: 'POST', url: 'Member/addMemberFeedback', data})
}
// 分享接力
export const apiGetOrderShareByOrderId = (data) => {
  return request({method: 'POST', url: 'Order/getOrderShareByOrderId', data})
}
// 获取订单接力信息
export const apiGetOrderShare = (data) => {
  return request({method: 'GET', url: 'Order/getOrderShare', data})
}
// 为他接力 
export const apiGetClickOrderRelay = (data) => {
  return request({method: 'POST', url: 'Order/getClickOrderRelay', data})
}
// 删除接力订单
export const apiDelOrderShareById = (data) => {
  return request({method: 'POST', url: 'Order/delOrderShareById', data})
}

// 接力二维码
export const apiOrderXcCode = (data) => {
  return request({method: 'POST', url: 'Qrcode/orderXcCode', data})
}
// 接力佣金明细 
export const apiGetOrderShareList = (data) => {
  return request({method: 'POST', url: 'Balance/getOrderShareList', data})
}
// 所有未到账收益
export const apiAllNotOrderCommissionList = (data) => {
  return request({method: 'POST', url: 'Balance/allNotOrderCommissionList', data})
}
